<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSONP Test</title>

    <script src="../js/lib/jquery-1.7.2.min.js"></script>
    <style>

    </style>
    <script>
        $(function () {
            var url = 'http://localhost:8888/dms/scripts/jsonpservice.groovy?callback=?';
            $('#url').html('URL: ' + url);
            $.getJSON(url, function (json) {
                console.debug(json);
                var text = json ? 'Successfully get json data from jsonp service, name: ' + json.name + ", birthday: " + json.birthday : 'JSON call failed.';
                $('#content').text(text);
            });
        });
    </script>
</head>
<body>
<span id="url"></span>

<div id="content" style="border: 1px solid blue">Hello, world.</div>
</body>
</html>